import React, { memo } from 'react'
import { ThemeHeaderRcmWrapper } from "./style";
import PropTypes from 'prop-types';


const HjThemeHeaderRCM =  memo(function(props) {
  const {title,keyword} = props;
  return (
    <ThemeHeaderRcmWrapper className="sprite_02">
        <div className="left">
          <h3 className="title">{title}</h3>
          <div className="keyword">
            {
              keyword.map((item,index)=>{
                return (
                  <a className="item" href="goto" key={item}>{item}
                  <span>{index===4? '':'|'}</span>
                  </a>
                  
                )
              })
            }
          </div>
        </div>
        <div className="right">
            <a href="/goto">更多</a>
            <i className="sprite_02"></i>
        </div>
    </ThemeHeaderRcmWrapper>
  )
})

HjThemeHeaderRCM.propTypes = {
  title:PropTypes.string.isRequired,
  keyword: PropTypes.array
};
// 指定 props 的默认值：
HjThemeHeaderRCM.defaultProps = {
  keyword:[]
};

export default HjThemeHeaderRCM
